﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Wyn.PMS.Entity.DataAccess;

namespace Wyn.PMS.Test.Cache
{
    class BillNoTest
    {
        public static void Test()
        {
            //var xx = BitConverter.ToInt64(Guid.NewGuid().ToByteArray(),0);

            IList<string> billIds = new List<string>();

            int reCreate = 0;

            int count = 100000;
            
            for(var i=0;i<count;i++)
            {
                var xx=BillGenerator.CreateID("2011032", "D");

                //var no = LicenceGenerator.GetNo("hotel01", LicenceType.BillMain);

                if (billIds.Contains(xx)) reCreate++;

                billIds.Add(xx);
                
                Console.WriteLine(xx);
            }

            Console.WriteLine("{0}个内共有重复账号 {1} 个",count,reCreate);
        }
    }
}
